import "@/assets/css/iconfont.css"
import "@/assets/css/main.css"
import "@/utils/mui-loading"
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import VueClipboard from 'vue-clipboard2'	//剪贴板
Vue.use(VueClipboard)

//去除警告提示
Vue.config.productionTip = false;

/* 全局变量 */
Vue.prototype.bgbc = true;	//是否显示背景补充
Vue.prototype.routerTitle = "";	//顶部标题
Vue.prototype.kefu1 = __kefu1;
Vue.prototype.kefu2 = __kefu2;
Vue.prototype.payExplain = __payExplain;
Vue.prototype.caipiaoHelp = __caipiaoHelp;
Vue.prototype.nextLotteryRqTh = __nextLotteryRqTh;

//路由器执行前钩子
router.beforeEach((to,from,next)=>{ 
	//通过index参数判断路由执行先后顺序，设置动画方向
	// const toIndex = to.meta.index
	// const fromIndex = from.meta.index
	// Vue.prototype.transitionName = toIndex < fromIndex ? 'slide-right' : 'slide-left';//下级或同级切换向左动画
	
	//标题
	Vue.prototype.routerTitle = to.meta.title;
	
	//背景补充
	switch (to.path){
		case '/home':
			Vue.prototype.bgbc = false;
			break;
		case '/regist':
			Vue.prototype.bgbc = false;
			break;
		default:
			Vue.prototype.bgbc = true;
			break;
	}
	next()
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
